<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=Edge">
		<title>{$pageData.title}</title>
		<link rel="stylesheet" href="__STATIC__/home/css/admin.css" />
		<script type="text/javascript" src="__STATIC__/home/js/jquery.min.js" ></script>
	</head>
	<body class="pd30">
		<div class="center-nav f20">{$pageData.title}</div>
		<div class="center-tab b-w">
		    <form action="{:url('order.handle/payOrder')}" method="post" accept-charset="utf-8">
		    	<table class="table-cen" cellpadding="0" cellspacing="0">
					<tbody>

				    </tbody>

			    </table>
                <table class="table-lsh" cellpadding="0" cellspacing="0">
                    <tbody>

	                </tbody>
                </table>
                <input type="hidden" id="order_id" value="{$order_id}" />
		    </form>
		</div>
</body>
<script type="text/javascript">
$(function(){
	getDatas();
});

function getDatas(){
	var order_id = $("#order_id").val();
	$.ajax({
		'type':'post',
		'dataType':'json',
		'data':{order_id:order_id},
		'url':"{:url('order.api/orderDetails')}",
		'success':function(data){
			var html = '';
			var goods = '';
			goods = '<tr>'+'<td><div>订单号:'+data.order_id+'</div></td>'
	                 +'<td><div>订单总金额:'+data.amount+'</div></td>'
	                 +'<td><div>订单时间:'+data.create_time+'</div></td>'
	                 +'<td><div>订单状态:'+data.chs_status+'</div></td>'
	                 +'<tr>';
			$.each(data.goods,function(index,val){
				html += '<tr>'+'<td><a href="{:url('goods.show/details')}?id='+val.gid+'"><div><img src="'+val.photo+'"/></div></a></td>'
	                 +'<td><div>'+val.title+'</div></td>'
	                 +'<td><div>使用积分'+val.credit+'</div></td>'
                     +'<td><div>数量'+val.number+'</div></td>'
	                 +'<td><div>共计'+val.amount+''+val.coin_name+'</div></td>'
                     +'<tr>';
			});
			goods += '<tr>'+'<td><div>订单描述:'+data.des+'</div></td>'
	                 +'<td><div>订单留言:'+data.msg+'</div></td>'
	                 +'<tr>';
			$(".table-lsh tbody").html(html);
			$(".table-cen tbody").html(goods);
		}
	})
}
</script>
</html>